project(NVIDIA_NVAPI)

set(NVIDIA_NVAPI_INCLUDE_DIR "${NVIDIA_NVAPI_SOURCE_DIR}/include" CACHE PATH "")
if (OGREDEPS_PLATFORM_X64)
  set(NVIDIA_NVAPI_LIB_DIR "${NVIDIA_NVAPI_SOURCE_DIR}/lib64" CACHE PATH "")
else ()
  set(NVIDIA_NVAPI_LIB_DIR "${NVIDIA_NVAPI_SOURCE_DIR}/lib" CACHE PATH "")
endif ()
mark_as_advanced(NVIDIA_NVAPI_INCLUDE_DIR NVIDIA_NVAPI_LIB_DIR)

if (OGREDEPS_INSTALL_DEV)
  install(FILES include/nvapi.h include/NvApiDriverSettings.h DESTINATION include)
  if (OGREDEPS_PLATFORM_X64)
    install(FILES ${NVIDIA_NVAPI_LIB_DIR}/nvapi64.lib DESTINATION ${OGREDEPS_LIB_DIRECTORY}/${OGREDEPS_DEBUG_PATH})
    install(FILES ${NVIDIA_NVAPI_LIB_DIR}/nvapi64.lib DESTINATION ${OGREDEPS_LIB_DIRECTORY}/${OGREDEPS_RELEASE_PATH})
  else ()
    install(FILES ${NVIDIA_NVAPI_LIB_DIR}/nvapi.lib DESTINATION ${OGREDEPS_LIB_DIRECTORY}/${OGREDEPS_DEBUG_PATH})
    install(FILES ${NVIDIA_NVAPI_LIB_DIR}/nvapi.lib DESTINATION ${OGREDEPS_LIB_DIRECTORY}/${OGREDEPS_RELEASE_PATH})
  endif ()
endif ()
